home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
mc51bugs
/
q31556
< prev
next >
Wrap
Text File
|
1988-07-20
|
2KB
|
69 lines
Q31556 Internal Compiler Error: code.c 1.46, Line 500
C Compiler
5.00 5.10
MS-DOS
Summary:
The following program will generate the following error when
compiled with the default compile options:
fatal error C1001: Internal Compiler Error
(compiler file '@(#)code.c:1.46',line 500)
Contact Microsoft Technical Support
The error is a result of incorrectly declaring an enum type within
the function prototype.
To work around the problem, declare the enum type before declaring
the function prototype.
Microsoft has confirmed this to be a problem in Versions 5.00 and
5.10.
More Information:
The following code example reproduces the error:
#include <process.h>
#include <stdlib.h>
#include <string.h>
/* Making these declarations will resolve the problem:
enum BEEP { BEEP_silent, BEEP_quiet,
BEEP_normal, BEEP_loud } type;
extern void sys_setbeep( BEEP a );
*/
extern void sys_setbeep(enum BEEP { BEEP_silent, BEEP_quiet,
BEEP_normal, BEEP_loud } type );
extern void setpgm(char *name);
extern void userror(char *cs,...);
extern int isnewer(char const *file1, char const *file2);
#ifndef noassert /* otherwise get allocation > 64K errors */
main(int argc, char *argv[])
{
setpgm(argv[0]);
if (argc < 4)
userror("too few arguements");
switch (isnewer(argv[1], argv[2]))
{
case -1:
userror("%s does not exist",argv[1]);
case 0:
return(0);
case 1:
execvp(argv[3], &argv[3]);
userror("unable to execute command '%s' : %s",argv[3],
strerror(errno));
return(3);
}
}
#endif
Keywords: buglist5.00 buglist5.10
Updated 88/07/21 03:19